export const rules = {
    tellerNoRule: [
        {
            validator: (rule, value, callback) => {
                const reg = /^[0-9]+$/
                if (!value || value === '') {
                    callback(new Error('请输入员工工号'))
                } else if (value.length !== 6) {
                    callback(new Error('员工工号长度为于6位数字'))
                } else if (!reg.test(value)) {
                    callback(new Error('工号由数字组成'))
                } else {
                    callback()
                }
            }, trigger: 'blur'
        }
    ],
    passwordRule: [
        { required: true, message: '请输密码', trigger: 'blur' }
    ],
    branchNoRule: [
        { min: 4, max: 4, message: '机构号长度为4', trigger: 'blur' },
        { required: true, message: '请输机构号', trigger: 'blur' }
    ]
}

